package com.example.module_home

import android.os.Bundle
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat

class MainBActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        enableEdgeToEdge()
        setContentView(R.layout.activity_main_bactivity)
        //单例传入上下文不能将activity作为上下文传入，会导致内存泄漏
        //原因：单例实例持有activity，实例静态的永远无法被回收，导致activity无法被回收，产生内存泄漏
        //解决：将application作为上下文
        Single.getInstance(application)
    }
}